!function() {
    var t, s = "undefined" == typeof window ? require("./Crypto").Crypto : window.Crypto, e = s.util, i = s.charenc.UTF8;
    (t = function(t) {
        this.keys = new Array(16), this._initialiseKeys(t);
    }).PC1_offsets = [ 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 3, 2, 1, 0 ], 
    t.PC1_masks = [ 128, 128, 128, 128, 128, 128, 128, 128, 64, 64, 64, 64, 64, 64, 64, 64, 32, 32, 32, 32, 32, 32, 32, 32, 16, 16, 16, 16, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16 ], 
    t.PC2_offsets1 = [ 0, 3, 1, 2, 0, 1, 3, 2, 0, 1, 0, 2, 3, 0, 1, 3, 0, 0, 2, 3, 1, 0, 2, 0, 0, 2, 3, 1 ], 
    t.PC2_offsets2 = [ 7, 5, 4, 7, 5, 6, 0, 7, 4, 0, 6, 5, 4, 7, 0, 6, 5, 7, 4, 5, 6, 7, 5, 4, 6, 0, 4, 6 ], 
    t.PC2_masks1 = [ 2, 1, 32, 4, 1, 4, 16, 1, 0, 1, 8, 8, 2, 32, 8, 32, 16, 0, 16, 4, 2, 0, 32, 4, 0, 2, 8, 16 ], 
    t.PC2_masks2 = [ 2, 32, 8, 1, 2, 2, 0, 4, 4, 0, 8, 16, 32, 16, 0, 32, 4, 32, 2, 1, 16, 8, 8, 16, 1, 0, 1, 4 ], 
    t.keyShifts = [ 1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28 ], t.prototype._initialiseKeys = function(s) {
        var e, i = new Array(56);
        for (e = 0; e < 56; e++) i[e] = 0 != (s[t.PC1_offsets[e]] & t.PC1_masks[e]);
        var r = i.slice(0, 28), h = i.slice(28, 56);
        for (r = r.concat(r), h = h.concat(h), e = 0; e < 16; e++) {
            for (var n = [ 0, 0, 0, 0, 0, 0, 0, 0 ], o = t.keyShifts[e], a = 0; a < 28; a++) r[a + o] && (n[t.PC2_offsets1[a]] += t.PC2_masks1[a]), 
            h[a + o] && (n[t.PC2_offsets2[a]] += t.PC2_masks2[a]);
            n[0] = ((31 & n[0]) << 27) + ((32 & n[0]) >> 5);
            for (a = 1; a <= 6; a++) n[a] = n[a] << 27 - 4 * a;
            n[7] = ((62 & n[7]) >> 1) + ((1 & n[7]) << 31), this.keys[e] = n;
        }
    }, t.prototype.getKey = function(t) {
        return this.keys[t];
    };
    var r;
    (r = function() {
        this.lhs = 0, this.rhs = 0;
    }).SBOX_MASK = [ 4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679 ];
    var h = r.SBOX = new Array(8);
    h[0] = new Array(), h[0][0] = 8421888, h[0][268435456] = 32768, h[0][536870912] = 8421378, 
    h[0][805306368] = 2, h[0][1073741824] = 512, h[0][1342177280] = 8421890, h[0][1610612736] = 8389122, 
    h[0][1879048192] = 8388608, h[0][-2147483648] = 514, h[0][-1879048192] = 8389120, 
    h[0][-1610612736] = 33280, h[0][-1342177280] = 8421376, h[0][-1073741824] = 32770, 
    h[0][-805306368] = 8388610, h[0][-536870912] = 0, h[0][-268435456] = 33282, h[0][134217728] = 0, 
    h[0][402653184] = 8421890, h[0][671088640] = 33282, h[0][939524096] = 32768, h[0][1207959552] = 8421888, 
    h[0][1476395008] = 512, h[0][1744830464] = 8421378, h[0][2013265920] = 2, h[0][-2013265920] = 8389120, 
    h[0][-1744830464] = 33280, h[0][-1476395008] = 8421376, h[0][-1207959552] = 8389122, 
    h[0][-939524096] = 8388610, h[0][-671088640] = 32770, h[0][-402653184] = 514, h[0][-134217728] = 8388608, 
    h[0][1] = 32768, h[0][268435457] = 2, h[0][536870913] = 8421888, h[0][805306369] = 8388608, 
    h[0][1073741825] = 8421378, h[0][1342177281] = 33280, h[0][1610612737] = 512, h[0][1879048193] = 8389122, 
    h[0][-2147483647] = 8421890, h[0][-1879048191] = 8421376, h[0][-1610612735] = 8388610, 
    h[0][-1342177279] = 33282, h[0][-1073741823] = 514, h[0][-805306367] = 8389120, 
    h[0][-536870911] = 32770, h[0][-268435455] = 0, h[0][134217729] = 8421890, h[0][402653185] = 8421376, 
    h[0][671088641] = 8388608, h[0][939524097] = 512, h[0][1207959553] = 32768, h[0][1476395009] = 8388610, 
    h[0][1744830465] = 2, h[0][2013265921] = 33282, h[0][-2013265919] = 32770, h[0][-1744830463] = 8389122, 
    h[0][-1476395007] = 514, h[0][-1207959551] = 8421888, h[0][-939524095] = 8389120, 
    h[0][-671088639] = 0, h[0][-402653183] = 33280, h[0][-134217727] = 8421378, h[1] = new Array(), 
    h[1][0] = 1074282512, h[1][16777216] = 16384, h[1][33554432] = 524288, h[1][50331648] = 1074266128, 
    h[1][67108864] = 1073741840, h[1][83886080] = 1074282496, h[1][100663296] = 1073758208, 
    h[1][117440512] = 16, h[1][134217728] = 540672, h[1][150994944] = 1073758224, h[1][167772160] = 1073741824, 
    h[1][184549376] = 540688, h[1][201326592] = 524304, h[1][218103808] = 0, h[1][234881024] = 16400, 
    h[1][251658240] = 1074266112, h[1][8388608] = 1073758208, h[1][25165824] = 540688, 
    h[1][41943040] = 16, h[1][58720256] = 1073758224, h[1][75497472] = 1074282512, h[1][92274688] = 1073741824, 
    h[1][109051904] = 524288, h[1][125829120] = 1074266128, h[1][142606336] = 524304, 
    h[1][159383552] = 0, h[1][176160768] = 16384, h[1][192937984] = 1074266112, h[1][209715200] = 1073741840, 
    h[1][226492416] = 540672, h[1][243269632] = 1074282496, h[1][260046848] = 16400, 
    h[1][268435456] = 0, h[1][285212672] = 1074266128, h[1][301989888] = 1073758224, 
    h[1][318767104] = 1074282496, h[1][335544320] = 1074266112, h[1][352321536] = 16, 
    h[1][369098752] = 540688, h[1][385875968] = 16384, h[1][402653184] = 16400, h[1][419430400] = 524288, 
    h[1][436207616] = 524304, h[1][452984832] = 1073741840, h[1][469762048] = 540672, 
    h[1][486539264] = 1073758208, h[1][503316480] = 1073741824, h[1][520093696] = 1074282512, 
    h[1][276824064] = 540688, h[1][293601280] = 524288, h[1][310378496] = 1074266112, 
    h[1][327155712] = 16384, h[1][343932928] = 1073758208, h[1][360710144] = 1074282512, 
    h[1][377487360] = 16, h[1][394264576] = 1073741824, h[1][411041792] = 1074282496, 
    h[1][427819008] = 1073741840, h[1][444596224] = 1073758224, h[1][461373440] = 524304, 
    h[1][478150656] = 0, h[1][494927872] = 16400, h[1][511705088] = 1074266128, h[1][528482304] = 540672, 
    h[2] = new Array(), h[2][0] = 260, h[2][1048576] = 0, h[2][2097152] = 67109120, 
    h[2][3145728] = 65796, h[2][4194304] = 65540, h[2][5242880] = 67108868, h[2][6291456] = 67174660, 
    h[2][7340032] = 67174400, h[2][8388608] = 67108864, h[2][9437184] = 67174656, h[2][10485760] = 65792, 
    h[2][11534336] = 67174404, h[2][12582912] = 67109124, h[2][13631488] = 65536, h[2][14680064] = 4, 
    h[2][15728640] = 256, h[2][524288] = 67174656, h[2][1572864] = 67174404, h[2][2621440] = 0, 
    h[2][3670016] = 67109120, h[2][4718592] = 67108868, h[2][5767168] = 65536, h[2][6815744] = 65540, 
    h[2][7864320] = 260, h[2][8912896] = 4, h[2][9961472] = 256, h[2][11010048] = 67174400, 
    h[2][12058624] = 65796, h[2][13107200] = 65792, h[2][14155776] = 67109124, h[2][15204352] = 67174660, 
    h[2][16252928] = 67108864, h[2][16777216] = 67174656, h[2][17825792] = 65540, h[2][18874368] = 65536, 
    h[2][19922944] = 67109120, h[2][20971520] = 256, h[2][22020096] = 67174660, h[2][23068672] = 67108868, 
    h[2][24117248] = 0, h[2][25165824] = 67109124, h[2][26214400] = 67108864, h[2][27262976] = 4, 
    h[2][28311552] = 65792, h[2][29360128] = 67174400, h[2][30408704] = 260, h[2][31457280] = 65796, 
    h[2][32505856] = 67174404, h[2][17301504] = 67108864, h[2][18350080] = 260, h[2][19398656] = 67174656, 
    h[2][20447232] = 0, h[2][21495808] = 65540, h[2][22544384] = 67109120, h[2][23592960] = 256, 
    h[2][24641536] = 67174404, h[2][25690112] = 65536, h[2][26738688] = 67174660, h[2][27787264] = 65796, 
    h[2][28835840] = 67108868, h[2][29884416] = 67109124, h[2][30932992] = 67174400, 
    h[2][31981568] = 4, h[2][33030144] = 65792, h[3] = new Array(), h[3][0] = 2151682048, 
    h[3][65536] = 2147487808, h[3][131072] = 4198464, h[3][196608] = 2151677952, h[3][262144] = 0, 
    h[3][327680] = 4198400, h[3][393216] = 2147483712, h[3][458752] = 4194368, h[3][524288] = 2147483648, 
    h[3][589824] = 4194304, h[3][655360] = 64, h[3][720896] = 2147487744, h[3][786432] = 2151678016, 
    h[3][851968] = 4160, h[3][917504] = 4096, h[3][983040] = 2151682112, h[3][32768] = 2147487808, 
    h[3][98304] = 64, h[3][163840] = 2151678016, h[3][229376] = 2147487744, h[3][294912] = 4198400, 
    h[3][360448] = 2151682112, h[3][425984] = 0, h[3][491520] = 2151677952, h[3][557056] = 4096, 
    h[3][622592] = 2151682048, h[3][688128] = 4194304, h[3][753664] = 4160, h[3][819200] = 2147483648, 
    h[3][884736] = 4194368, h[3][950272] = 4198464, h[3][1015808] = 2147483712, h[3][1048576] = 4194368, 
    h[3][1114112] = 4198400, h[3][1179648] = 2147483712, h[3][1245184] = 0, h[3][1310720] = 4160, 
    h[3][1376256] = 2151678016, h[3][1441792] = 2151682048, h[3][1507328] = 2147487808, 
    h[3][1572864] = 2151682112, h[3][1638400] = 2147483648, h[3][1703936] = 2151677952, 
    h[3][1769472] = 4198464, h[3][1835008] = 2147487744, h[3][1900544] = 4194304, h[3][1966080] = 64, 
    h[3][2031616] = 4096, h[3][1081344] = 2151677952, h[3][1146880] = 2151682112, h[3][1212416] = 0, 
    h[3][1277952] = 4198400, h[3][1343488] = 4194368, h[3][1409024] = 2147483648, h[3][1474560] = 2147487808, 
    h[3][1540096] = 64, h[3][1605632] = 2147483712, h[3][1671168] = 4096, h[3][1736704] = 2147487744, 
    h[3][1802240] = 2151678016, h[3][1867776] = 4160, h[3][1933312] = 2151682048, h[3][1998848] = 4194304, 
    h[3][2064384] = 4198464, h[4] = new Array(), h[4][0] = 128, h[4][4096] = 17039360, 
    h[4][8192] = 262144, h[4][12288] = 536870912, h[4][16384] = 537133184, h[4][20480] = 16777344, 
    h[4][24576] = 553648256, h[4][28672] = 262272, h[4][32768] = 16777216, h[4][36864] = 537133056, 
    h[4][40960] = 536871040, h[4][45056] = 553910400, h[4][49152] = 553910272, h[4][53248] = 0, 
    h[4][57344] = 17039488, h[4][61440] = 553648128, h[4][2048] = 17039488, h[4][6144] = 553648256, 
    h[4][10240] = 128, h[4][14336] = 17039360, h[4][18432] = 262144, h[4][22528] = 537133184, 
    h[4][26624] = 553910272, h[4][30720] = 536870912, h[4][34816] = 537133056, h[4][38912] = 0, 
    h[4][43008] = 553910400, h[4][47104] = 16777344, h[4][51200] = 536871040, h[4][55296] = 553648128, 
    h[4][59392] = 16777216, h[4][63488] = 262272, h[4][65536] = 262144, h[4][69632] = 128, 
    h[4][73728] = 536870912, h[4][77824] = 553648256, h[4][81920] = 16777344, h[4][86016] = 553910272, 
    h[4][90112] = 537133184, h[4][94208] = 16777216, h[4][98304] = 553910400, h[4][102400] = 553648128, 
    h[4][106496] = 17039360, h[4][110592] = 537133056, h[4][114688] = 262272, h[4][118784] = 536871040, 
    h[4][122880] = 0, h[4][126976] = 17039488, h[4][67584] = 553648256, h[4][71680] = 16777216, 
    h[4][75776] = 17039360, h[4][79872] = 537133184, h[4][83968] = 536870912, h[4][88064] = 17039488, 
    h[4][92160] = 128, h[4][96256] = 553910272, h[4][100352] = 262272, h[4][104448] = 553910400, 
    h[4][108544] = 0, h[4][112640] = 553648128, h[4][116736] = 16777344, h[4][120832] = 262144, 
    h[4][124928] = 537133056, h[4][129024] = 536871040, h[5] = new Array(), h[5][0] = 268435464, 
    h[5][256] = 8192, h[5][512] = 270532608, h[5][768] = 270540808, h[5][1024] = 268443648, 
    h[5][1280] = 2097152, h[5][1536] = 2097160, h[5][1792] = 268435456, h[5][2048] = 0, 
    h[5][2304] = 268443656, h[5][2560] = 2105344, h[5][2816] = 8, h[5][3072] = 270532616, 
    h[5][3328] = 2105352, h[5][3584] = 8200, h[5][3840] = 270540800, h[5][128] = 270532608, 
    h[5][384] = 270540808, h[5][640] = 8, h[5][896] = 2097152, h[5][1152] = 2105352, 
    h[5][1408] = 268435464, h[5][1664] = 268443648, h[5][1920] = 8200, h[5][2176] = 2097160, 
    h[5][2432] = 8192, h[5][2688] = 268443656, h[5][2944] = 270532616, h[5][3200] = 0, 
    h[5][3456] = 270540800, h[5][3712] = 2105344, h[5][3968] = 268435456, h[5][4096] = 268443648, 
    h[5][4352] = 270532616, h[5][4608] = 270540808, h[5][4864] = 8200, h[5][5120] = 2097152, 
    h[5][5376] = 268435456, h[5][5632] = 268435464, h[5][5888] = 2105344, h[5][6144] = 2105352, 
    h[5][6400] = 0, h[5][6656] = 8, h[5][6912] = 270532608, h[5][7168] = 8192, h[5][7424] = 268443656, 
    h[5][7680] = 270540800, h[5][7936] = 2097160, h[5][4224] = 8, h[5][4480] = 2105344, 
    h[5][4736] = 2097152, h[5][4992] = 268435464, h[5][5248] = 268443648, h[5][5504] = 8200, 
    h[5][5760] = 270540808, h[5][6016] = 270532608, h[5][6272] = 270540800, h[5][6528] = 270532616, 
    h[5][6784] = 8192, h[5][7040] = 2105352, h[5][7296] = 2097160, h[5][7552] = 0, h[5][7808] = 268435456, 
    h[5][8064] = 268443656, h[6] = new Array(), h[6][0] = 1048576, h[6][16] = 33555457, 
    h[6][32] = 1024, h[6][48] = 1049601, h[6][64] = 34604033, h[6][80] = 0, h[6][96] = 1, 
    h[6][112] = 34603009, h[6][128] = 33555456, h[6][144] = 1048577, h[6][160] = 33554433, 
    h[6][176] = 34604032, h[6][192] = 34603008, h[6][208] = 1025, h[6][224] = 1049600, 
    h[6][240] = 33554432, h[6][8] = 34603009, h[6][24] = 0, h[6][40] = 33555457, h[6][56] = 34604032, 
    h[6][72] = 1048576, h[6][88] = 33554433, h[6][104] = 33554432, h[6][120] = 1025, 
    h[6][136] = 1049601, h[6][152] = 33555456, h[6][168] = 34603008, h[6][184] = 1048577, 
    h[6][200] = 1024, h[6][216] = 34604033, h[6][232] = 1, h[6][248] = 1049600, h[6][256] = 33554432, 
    h[6][272] = 1048576, h[6][288] = 33555457, h[6][304] = 34603009, h[6][320] = 1048577, 
    h[6][336] = 33555456, h[6][352] = 34604032, h[6][368] = 1049601, h[6][384] = 1025, 
    h[6][400] = 34604033, h[6][416] = 1049600, h[6][432] = 1, h[6][448] = 0, h[6][464] = 34603008, 
    h[6][480] = 33554433, h[6][496] = 1024, h[6][264] = 1049600, h[6][280] = 33555457, 
    h[6][296] = 34603009, h[6][312] = 1, h[6][328] = 33554432, h[6][344] = 1048576, 
    h[6][360] = 1025, h[6][376] = 34604032, h[6][392] = 33554433, h[6][408] = 34603008, 
    h[6][424] = 0, h[6][440] = 34604033, h[6][456] = 1049601, h[6][472] = 1024, h[6][488] = 33555456, 
    h[6][504] = 1048577, h[7] = new Array(), h[7][0] = 134219808, h[7][1] = 131072, 
    h[7][2] = 134217728, h[7][3] = 32, h[7][4] = 131104, h[7][5] = 134350880, h[7][6] = 134350848, 
    h[7][7] = 2048, h[7][8] = 134348800, h[7][9] = 134219776, h[7][10] = 133120, h[7][11] = 134348832, 
    h[7][12] = 2080, h[7][13] = 0, h[7][14] = 134217760, h[7][15] = 133152, h[7][-2147483648] = 2048, 
    h[7][-2147483647] = 134350880, h[7][-2147483646] = 134219808, h[7][-2147483645] = 134217728, 
    h[7][-2147483644] = 134348800, h[7][-2147483643] = 133120, h[7][-2147483642] = 133152, 
    h[7][-2147483641] = 32, h[7][-2147483640] = 134217760, h[7][-2147483639] = 2080, 
    h[7][-2147483638] = 131104, h[7][-2147483637] = 134350848, h[7][-2147483636] = 0, 
    h[7][-2147483635] = 134348832, h[7][-2147483634] = 134219776, h[7][-2147483633] = 131072, 
    h[7][16] = 133152, h[7][17] = 134350848, h[7][18] = 32, h[7][19] = 2048, h[7][20] = 134219776, 
    h[7][21] = 134217760, h[7][22] = 134348832, h[7][23] = 131072, h[7][24] = 0, h[7][25] = 131104, 
    h[7][26] = 134348800, h[7][27] = 134219808, h[7][28] = 134350880, h[7][29] = 133120, 
    h[7][30] = 2080, h[7][31] = 134217728, h[7][-2147483632] = 131072, h[7][-2147483631] = 2048, 
    h[7][-2147483630] = 134348832, h[7][-2147483629] = 133152, h[7][-2147483628] = 32, 
    h[7][-2147483627] = 134348800, h[7][-2147483626] = 134217728, h[7][-2147483625] = 134219808, 
    h[7][-2147483624] = 134350880, h[7][-2147483623] = 134217760, h[7][-2147483622] = 134219776, 
    h[7][-2147483621] = 0, h[7][-2147483620] = 133120, h[7][-2147483619] = 2080, h[7][-2147483618] = 131104, 
    h[7][-2147483617] = 134350848, r.prototype._exchangeLR = function(t, s) {
        var e = (this.lhs >> t ^ this.rhs) & s;
        this.rhs ^= e, this.lhs ^= e << t;
    }, r.prototype._exchangeRL = function(t, s) {
        var e = (this.rhs >> t ^ this.lhs) & s;
        this.lhs ^= e, this.rhs ^= e << t;
    }, r.prototype.initialPerm = function(t, s) {
        var e = t.slice(s, s + 8);
        this.lhs = (e[0] << 24) + (e[1] << 16) + (e[2] << 8) + e[3], this.rhs = (e[4] << 24) + (e[5] << 16) + (e[6] << 8) + e[7], 
        this._exchangeLR(4, 252645135), this._exchangeLR(16, 65535), this._exchangeRL(2, 858993459), 
        this._exchangeRL(8, 16711935), this._exchangeLR(1, 1431655765);
    }, r.prototype.round = function(t) {
        for (var s = this.rhs, e = this.lhs, i = 0, h = 0; h < 8; h++) {
            var n = (s ^ t[h]) & r.SBOX_MASK[h];
            i += r.SBOX[h][n];
        }
        this.lhs = s, this.rhs = e ^ i;
    }, r.prototype.finalPerm = function(t, s) {
        var e = this.lhs;
        this.lhs = this.rhs, this.rhs = e, this._exchangeLR(1, 1431655765), this._exchangeRL(8, 16711935), 
        this._exchangeRL(2, 858993459), this._exchangeLR(16, 65535), this._exchangeLR(4, 252645135), 
        t[s] = this.lhs >> 24 & 255, t[s + 1] = this.lhs >> 16 & 255, t[s + 2] = this.lhs >> 8 & 255, 
        t[s + 3] = 255 & this.lhs, t[s + 4] = this.rhs >> 24 & 255, t[s + 5] = this.rhs >> 16 & 255, 
        t[s + 6] = this.rhs >> 8 & 255, t[s + 7] = 255 & this.rhs;
    };
    var n = s.DES = {
        _blocksize: 2,
        _keyschedule: null,
        _state: new r(),
        _init: function(s) {
            this._keyschedule = new t(s);
        },
        encrypt: function(r, h, o) {
            var a = (o = o || {}).mode || new s.mode.OFB();
            a.fixOptions && a.fixOptions(o);
            var c = r.constructor == String ? i.stringToBytes(r) : r, y = o.iv || e.randomBytes(8), f = h.constructor == String ? s.PBKDF2(h, y, 8, {
                asBytes: !0
            }) : h;
            return this._keyschedule = new t(f), a.encrypt(n, c, y), c = o.iv ? c : y.concat(c), 
            o && o.asBytes ? c : e.bytesToBase64(c);
        },
        _encryptblock: function(t, s) {
            this._state.initialPerm(t, s);
            for (var e = 0; e <= 15; e++) this._state.round(this._keyschedule.getKey(e));
            this._state.finalPerm(t, s);
        },
        decrypt: function(r, h, o) {
            var a = (o = o || {}).mode || new s.mode.OFB();
            a.fixOptions && a.fixOptions(o);
            var c = r.constructor == String ? e.base64ToBytes(r) : r, y = o.iv || c.splice(0, 8), f = h.constructor == String ? s.PBKDF2(h, y, 32, {
                asBytes: !0
            }) : h;
            return this._keyschedule = new t(f), a.decrypt(n, c, y), o && o.asBytes ? c : i.bytesToString(c);
        },
        _decryptblock: function(t, s) {
            this._state.initialPerm(t, s);
            for (var e = 15; e >= 0; e--) this._state.round(this._keyschedule.getKey(e));
            this._state.finalPerm(t, s);
        }
    };
}();